package com.ereport.entity;



import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "daily_activity")
public class DailyActivity implements Serializable{
	
	@Id
	@GeneratedValue(generator="increment")
	@GenericGenerator(name="increment", strategy = "increment")
	private Integer id;
	
	
	@ManyToOne
	@JoinColumn(name="exe_id")
	private Executives exeId;
	
	private String organisation;
	
	@Column(name="cont_person")
	private String contPerson;
	
	private String division;
	
	@Column(name="cont_person_mbl")
	private String contPerMbl;
	
	@Column(name="cont_person_email")
	private String contPerEmail;
	
	@Column(name="cont_person_fax")
	private String contPerFax;

	@Column(name="cont_person_land")
	private String contPerLand;
	
	@Column(name="visit_objective")
	private String vistObj;
	
	@Column(name="visit_outcome")
	private String vistOc;
	
	private String nextstep;
	
	private Integer kms;
	
	private Date edate;
	
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "dact_id", referencedColumnName = "id")
	private Set<Opportunity> opp = new HashSet<Opportunity>();
	
	public DailyActivity(Executives ex, String org, String desgn,
			String contper, String contmobile, String contemail, String contfax,
			String contlandph, 
			String visitObj, String visitOC, String nststep, int km,
			java.util.Date dt) {
		
		this.exeId=ex;
		this.organisation=org;
		this.division=desgn;
		this.contPerson=contper;
		this.contPerMbl=contmobile;
		this.contPerEmail=contemail;
		this.contPerFax=contfax;
		this.contPerLand=contlandph;
		
		
		this.vistObj=visitObj;
		this.vistOc=visitOC;
		this.nextstep=nststep;
		this.kms=km;
		this.edate=dt;
		
	}

	public DailyActivity() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Executives getExeId() {
		return exeId;
	}

	public void setExeId(Executives exeId) {
		this.exeId = exeId;
	}

	public String getOrganisation() {
		return organisation;
	}

	public void setOrganisation(String organisation) {
		this.organisation = organisation;
	}

	public String getContPerson() {
		return contPerson;
	}

	public void setContPerson(String contPerson) {
		this.contPerson = contPerson;
	}

	public String getDivision() {
		return division;
	}

	public void setDivision(String division) {
		this.division = division;
	}

	public String getContPerMbl() {
		return contPerMbl;
	}

	public void setContPerMbl(String contPerMbl) {
		this.contPerMbl = contPerMbl;
	}

	public String getContPerEmail() {
		return contPerEmail;
	}

	public void setContPerEmail(String contPerEmail) {
		this.contPerEmail = contPerEmail;
	}

	public String getContPerFax() {
		return contPerFax;
	}

	public void setContPerFax(String contPerFax) {
		this.contPerFax = contPerFax;
	}

	public String getContPerLand() {
		return contPerLand;
	}

	public void setContPerLand(String contPerLand) {
		this.contPerLand = contPerLand;
	}

	public String getVistObj() {
		return vistObj;
	}

	public void setVistObj(String vistObj) {
		this.vistObj = vistObj;
	}

	public String getVistOc() {
		return vistOc;
	}

	public void setVistOc(String vistOc) {
		this.vistOc = vistOc;
	}

	public String getNextstep() {
		return nextstep;
	}

	public void setNextstep(String nextstep) {
		this.nextstep = nextstep;
	}

	public Integer getKms() {
		return kms;
	}

	public void setKms(Integer kms) {
		this.kms = kms;
	}

	public Date getEdate() {
		return edate;
	}

	public void setEdate(Date edate) {
		this.edate = edate;
	}

	
	
	
}
